<div class="control-group info">        
    <div>所属开发者：<span class="help-inline"><?php echo $add["username"];?></span>
    </div>
    <div>关 联 人 员：<span class="help-inline"><?php echo $add["assname"];?></span>
    </div>
    <p><hr><b>应用信息</b> <span class="btn">设置广告位&上传应用</span><span style=" color: red;"><?php echo $err_msg; ?></span><hr></p>
</div>
<form class="bs-docs-example form-horizontal" style=" background-color:  #ddd; width: 700px;text-align: center" action="<?php echo WEB_DOMAIN; ?>/app/adset" id="register_submit" method="post" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="add[id]" value="<?php echo $data["uid"] ?>">
    <hr>
    <div class="control-group info">
        <label for="inputError" class="control-label">你的游戏设计方式：</label>
        <div class="controls form-inline">
                <label><input type="radio"  name="add[0]" id="version" value="0" checked>关卡</label>
                <label><input type="radio"  name="add[0]" id="version" value="1">等级</label>
                <label><input type="radio"  name="add[0]" id="version" value="2">分数</label>
            <span class="help-inline">您可根据您的游戏从易到难程度设置8个广告位</span>
        </div>
    </div>
    <h5>第1级广告位：默认承接CPM（千次展示收费）广告，建议在游戏简单关卡后设置该广告位</h5>
    <div class="control-group info">
        <label for="input" class="control-label">第1级广告位条件*：</label>
        <div class="controls">
            <input class="input-mini" id="ad_1_1" name="add[1][one]" type="text" placeholder="数值" value="<?php echo $add[1]["one"]; ?>">
            ~
            <input class="input-mini" id="ad_1_2" name="add[1][two]" type="text" placeholder="数值" value="<?php echo $add[1]["two"]; ?>">
            <span class="help-inline">广告位条件范围均用数字表示</span>
        </div>
    </div>
    <h5>第2~8级广告位：默认承接CPA（按照效果收费）广告，建议根据游戏从易到难顺序设置广告位</h5>
    <?php for ($i = 2; $i < 9; $i++) { ?>
        <div class="control-group info">
            <label for="input" class="control-label">第<?php echo $i; ?>级广告位条件*：</label>
            <div class="controls">
                <input class="input-mini" id="ad_<?php echo $i; ?>_1" name="add[<?php echo $i; ?>][one]" type="text" placeholder="数值" value="<?php echo $add[$i]["one"]; ?>">
                ~
                <input class="input-mini" id="ad_<?php echo $i; ?>_2" name="add[<?php echo $i; ?>][two]" type="text" placeholder="数值" value="<?php echo $add[$i]["two"]; ?>">
                <span class="help-inline">广告位条件范围均用数字表示</span>
            </div>
        </div>
    <?php } ?>
<script src="/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/uploadify/uploadify.css">
<h2>上传应用</h2>
<div class="controls-row">
     <div style=" margin-left: 200px;">
     <input type="hidden" id="uploadFileName" name="add[downurl]" value="<?php echo $add["downurl"];?>">
     <input type="file" id="file_upload"  multiple="true">
     <span class="help-inline" id="uperr"></span>
     </div>
    <span id="urllist"><?php if(isset($add["downurl"]))echo '应用地址:  /uploads/app/'.$add["downurl"];?></span>
</div>
    <div class="controls-row"><hr>
        <button name="subtype" class="btn" type="submit" id="showform"> 发 布 </button>
    </div><hr>
</form>
<script type="text/javascript">
<?php $timestamp = time(); ?>
     $(function() {
        adproject.uploadify($('#file_upload'), '<?= session_id(); ?>', 'app', '', ucallback);
        function ucallback(file, data, response) {
            data = eval('('+data+')');
            if( 'success' == data.res){
                 $("#uploadFileName").val(data.extra.filepath);
                 $("#urllist").html('应用地址:  /uploads/app/'+data.extra.filepath);
            }else{
                 $("#showform").html("上传失败");
            }
        }
    });
</script>